syntax error, unexpected token “>”
Description
This syntax error is characteristic of the pipe operator |> being used in version older than PHP 8.5.
Example
<?php
'abc' |> strtoupper(...);
?>
Alternatives
- Upgrade to PHP 8.5.
- Nest the calls, instead of using the pipe operator.
Changed Behavior
This error may appear following an evolution in behavior, in previous versions. See